package com.fulihui.information.common.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * @author LeeSon on 2016/12/25 0025.
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
public class AppConst implements Serializable {
    private static final long serialVersionUID = -7773555776429464725L;
    /**
     *
     */
    @Value("${zbus.broker.address}")
    private String  zbusUrl;
    /**
     *
     */
    @Value("${aliyun.oss.accesskeyid}")
    private String  ossKeyId;
    /**
     *
     */
    @Value("${aliyun.oss.accesskeysecret}")
    private String  ossKeySeySecret;
    /**
     *
     */
    @Value("${aliyun.oss.ossendpoint}")
    private String  ossEndpoint;
    /**
     *
     */
    @Value("${aliyun.oss.ossbucket}")
    private String  ossBucket;
    /**
     *
     */
    @Value("${image.tmp.dir}")
    private String  imgTmpDir;
    /**
     * 隐藏未审核的数据
     */
    @Value("${information.content.uncheck.hide}")
    private boolean contentUnCheckHide;
    /**
     * 内容可操作有效时间，超过有效时间，内容不能操作
     */
    @Value("${information.content.optional.expire.second}")
    private int     contentOptionalExpireSec;
    /**
     * 置顶内容存活秒数
     */
    @Value("${information.content.top.expire.seconds}")
    private int     contentTopExpireSec;
    /**
     * Redis保留的列表数据最大值
     */
    @Value("${information.content.redis.listitem.max.size}")
    private int     contentRedisListItemMaxSize;

    /**
     * 热门类目代码常量
     */
    public final static String CONTENT_HOTS_CATEGORY_CODE       = "YOUKANTOU_ALL_HOTS";
    /**
     * 娱乐八卦
     */
    public final static String CONTENT_ESSAY_JOKE_CATEGORY_CODE = "YOUKANTOU_ESSAY_JOKE";
    /**
     * 数据分隔符
     */
    public final static String DATA_SEPARATOR                   = "::";

}